package com.design.model.builder;

/**
 * @program: study
 * @className: Director
 * @description: TODO
 * @author: kukuxiahuni
 * @create: 2019-07-11 11:20
 * @version: v1.0
 **/
public class Director {

    public static void main(String[] args) {
        Director director = new Director();
        Builder builder1 = new ConcreteBuilderA();
        Builder builder2 = new ConcreteBuilderB();
        director.construct(builder1);

        Product p1 = builder1.getProduct();
        p1.show();

    }

    /**
     * 功能描述: TODO
     *
     * @param:
     * @return:
     * @auther: kukuxiahuni
     * @date: 2019/7/11 11:20 AM
     * @modify_auther: kukuxiahuni
     * @modify_time: 2019/7/11 11:20 AM
     **/
    public void construct(Builder builder) {
        builder.buildPartA();
        builder.buildPartB();
    }
}
